import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);
const routes = [
  {
    // redirect:"/login",
    path: "/login",
    name: "home",
    component: () => import("@/views/login"),
  },
  {
    path: "/registry",
    name: "registry",
    component: () => import("@/views/registry"),
  },
  {
    path: "/reset",
    name: "reset",
    component: () => import("@/views/reset"),
  },
  {
    path: "/search",
    name: "search",
    component: () => import("@/views/search"),
  },
  {
    path: "/bddetail",
    name: "bddetail",
    component: () => import("@/views/home/components/bddetail.vue"),
  },
  {
      path:"/desc",
      name:"desc",
      component: () => import("@/views/home/components/Desc.vue"),
  },
  {
    path: "",
    name: "layoyt",
    redirect:()=>import("@/views/home"),
    component: () => import("@/views/layout"),
    children: [
      {
        path: "/",
        name: "home",
        component: () => import("@/views/home"),
      },
      {
        path: "/special",
        name: "special",
        component: () => import("@/views/special"),
      },
      {
        path: "/classification",
        name: "classification",
        component: () => import("@/views/classification"),
      },
      {
        path: "/shopCar",
        name: "shopCar",
        component: () => import("@/views/shopCar"),
      },
      {
        path: "/my",
        name: "my",
        component: () => import("@/views/my"),
      },
    ],
  },
];
const router = new VueRouter({
  routes,
});

export default router;
